<template>
    <div ref="scroll">
        <slot></slot>
    </div>
</template>

<script>
import BScroll from "better-scroll";
export default {
    methods: {
        initBS() {
            this.$nextTick(() => {
                new BScroll(this.$refs.scroll, {
                    click:true,
                    // 在better-scroll 管理滚动条功能中，使用对应原生滚动行为
                    eventPassthrough:"horizontal"
                });
            });
        }
    },
    mounted() {
        this.initBS();
        // this.loadFilmsData();
    }
};
</script>